    <!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>塞纳皇宫-网站后台管理系统</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="icon" href="/static/admin/img/logo.png" type="image/x-icon">
    <link rel="shortcut icon" href="favicon.ico"> <link href="/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="/static/admin/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

    <link href="/static/admin/css/animate.css" rel="stylesheet">
    <link href="/static/admin/css/style.css?v=4.1.0" rel="stylesheet">


</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>咨询列表 </h5>
                       <div class="ibox-tools">
                        </div>
                    </div>
                    <div class="ibox-content">
                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                                <tr>
                                    <th>手机号码</th>
                                    <th>拍摄风格</th>
                                    <th>礼服数量</th>
                                    <th>相框数量</th>
                                    <th>相册数量</th>
                                    <th>提交来源</th>
                                    <th>提交时间</th>
                                    <th>是否处理</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            {if isset($data)  && $data !==''}
                            {volist name="data" id="v"}
                            <tr class="gradeX">
                                <td class="center">{$v.mobile}</td>
                                <td class="center">{$v.ps_style}</td>
                                <td class="center">{$v.lf_num}</td>
                                <td class="center">{$v.xk_num}</td>
                                <td class="center">{$v.xc_num}</td>
                                <td class="center">{if $v.sign=="pc"}PC端{elseif $v.sign="mobile"}移动端{else /}{/if}</td>
                                <td class="center">{if $v.create_time >0}{$v.create_time|date='Y-m-d H:i:s',###}{/if}</td>
                                <td class="center">{if $v.status==1}已处理{else}未处理{/if}</td>
                                {if $v.status ==1}
                                <td class="center"><a><span class="label label-primary">已处理</span></a>&nbsp;
                                    {else}
                                <td class="center" ><a style="color: #0B8E00;" href="javascript:;" onclick="edit({$v.id})"><span class="label label-warning">待处理</span></a>&nbsp;
                                    {/if}
                                    <a href="javascript:;" onclick="del(this,{$v.id})">删除</a></td>
                            </tr>
                            {/volist}
                            {/if}



                            </tbody>

                        </table>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 全局js -->
    <script src="/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <!--<script src="/static/admin/js/bootstrap.min.js?v=3.3.6"></script>-->
    <!--<script src="/static/admin/js/plugins/jeditable/jquery.jeditable.js"></script>-->
    <!-- Data Tables -->
    <script src="/static/admin/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="/static/admin/js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <!-- 自定义js -->
    <script src="/static/admin/js/content.js?v=1.0.0"></script>
    <script src="/static/admin/layer/layer.js"></script>
    <!-- Page-Level Scripts -->
    <script>
        $('.dataTables-example').DataTable({
            'order' : [8,'desc']
        })





        function fnClickAddRow() {
            window.location.href="/mobile.php/member/add_member";
            $('#editable').dataTable().fnAddData([
                "Custom row",
                "New row",
                "New row",
                "New row",
                "New row"]);
        }
        //处理
        function edit(id){
            layer.confirm('确认要处理吗？',function(){
                $.post("/mobile.php/consult/consultdeal",{id:id},function(e){
                    if(1==e.code){
                        layer.msg(e.msg);
                        setTimeout(function(){
                            window.location.reload();
                        },2000);
                    }else{
                        layer.msg(e.msg);
                        return  false;
                    }
                },'json')

            });
        }
        //删除
        function del(obj,id){
            layer.confirm('确认要删除吗？',function(){
                $.post("/mobile.php/consult/consultdel",{id:id},function(e){
                    if(1==e.code){
                        layer.msg(e.msg);
                        $(obj).parents("tr").remove();
                    }else{
                        layer.msg(e.msg);
                        return  false;
                    }
                 },'json')

            });
        }
    </script>
</body>

</html>
